package com.zbkj.crmeb.task.clean;

import com.zbkj.crmeb.front.service.UpdateService;
import com.zbkj.crmeb.front.service.impl.UpdateServiceImpl;
import com.zbkj.crmeb.user.service.UserSignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Configuration //读取配置
@EnableScheduling // 2.开启定时任务
public class CleanTempIp {
    @Autowired
    UpdateService updateService;

    @Autowired
    UserSignService userSignService;


    @Scheduled(cron = "0 */1 * * * *")
    public void cleanExpiredTempShare() {
        updateService.cleanExpiredTempShare();
    }


    @Scheduled(cron = "0 */1 * * * *")
    public void resetSignNumber() {
        userSignService.resetSignNumber();
    }

}
